import request from '@/utils/request'

export function fetchElectronicOrder(params) {
  return request({
    url: '/electronicOrder/fetch',
    method: 'get',
    params: params
  })
}

export function createElectronicOrder(data) {
  return request({
    url: '/electronicOrder/create',
    method: 'post',
    data: data
  })
}

export function deleteElectronicOrder(id) {
  return request({
    url: '/electronicOrder/delete/'+id,
    method: 'post'
  })
}

export function getElectronicOrderDetail(id) {
  return request({
    url: '/electronicOrder/detail/'+id,
    method: 'post'
  })
}

export function changeStatusElectronicOrder(params) {
  return request({
    url: '/electronicOrder/changeStatus',
    method: 'post',
    params: params
  })
}

export function fetchElectronicOrderItemList(id, params) {
  return request({
    url: '/electronicOrderItem/list/'+id,
    method: 'get',
    params: params
  })
}

export function updateElectronicOrderItem(ids) {
  return request({
    url: '/electronicOrderItem/update',
    method: 'post',
    params: ids
  })
}

export function deleteElectronicOrderItem(ids) {
  return request({
    url: '/electronicOrderItem/delete',
    method: 'post',
    params: ids
  })
}

export function ElectronicOrderItemUpdate(params) {
  return request({
    url: '/electronicOrderItem/update',
    method: 'post',
    params: params
  })
}

